import Vue from 'vue'
import VueRouter from 'vue-router'
import LogIn from '@/views/LogIn'
import LayOut from '@/views/LayOut'
import ShouYe from '@/views/ShouYe'
import ZhaoFang from '@/views/ZhaoFang'
import ZiXun from '@/views/ZiXun'
import MyUs from '@/views/MyUs'
import ShOw from '@/views/ShOw'
Vue.use(VueRouter)

// const routes = [

// ]

const router = new VueRouter({
  routes: [
    {
      path: '/',
      redirect: '/shouye'
    },
    {
      path: '/home',
      component: LogIn
    },
    {
      path: '/layout',
      component: LayOut,
      children: [
        {
          path: '/shouye',
          component: ShouYe
        },
        {
          path: '/zhaofang',
          component: ZhaoFang
        },
        {
          path: '/zixun',
          component: ZiXun
        },
        {
          path: '/my',
          component: MyUs
        }
      ]
    },
    {
      path: '/show/:id',
      component: ShOw
    }
  ]
})

export default router
